//
//  CreditCardFooterView.m
//  NewPro
//
//  Created by RYX on 2019/6/21.
//  Copyright © 2019 何荧红. All rights reserved.
//

#import "CreditCardFooterView.h"

@interface CreditCardFooterView ()

@property (nonatomic,strong) UIView *xibView;

@end

@implementation CreditCardFooterView

- (UIView *)xibView{
    
    if (!_xibView) {
        
        _xibView = [[[NSBundle mainBundle] loadNibNamed:@"CreditCardFooterView" owner:self options:nil] objectAtIndex:0];
    }
    
    return _xibView;
}

- (instancetype)initWithFrame:(CGRect)frame{
    
    if (self = [super initWithFrame:frame]) {
        
        [self setUI:frame];
    }
    
    return self;
}

- (void)setUI:(CGRect)frame{
    
    [self addSubview:self.xibView];
    
    self.xibView.frame = frame;
}

- (IBAction)onShareBtn:(UIButton *)sender {
    
    if (self.delegate && [self.delegate respondsToSelector:@selector(onFooterViewShareBtn)]) {
        
        [self.delegate onFooterViewShareBtn];
    }
}

@end
